﻿using BaseAuthRole.AspNetCore;
using BaseAuthRole.AspNetCore.Filters;
using BaseAuthRole.Domain.OutPut;
using BaseAuthRole.DTO.Auth;
using BaseAuthRole.IService;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using RS.BaseModel;
using RS.BaseModel.Common;

namespace BaseAuthRole.Web.Controllers
{

    [Route("[controller]/[action]")]
    public class TestController : Controller
    {
        private IUserService _userService;

        public TestController(IUserService userService)
        {
            this._userService = userService;
        }



        public IActionResult GetUserInfoByUid(string Uid)
        {

            var info = _userService.GetUserInfoByUid(new Domain.Input.GetUserInfoByUidInput
            {

                Uid = Uid

            });


            var str = JsonConvert.SerializeObject(info);

            var model = JsonConvert.DeserializeObject<CommonResult<GetUserInfoOutPut>>(str);


            return Ok(info);

        }

    }
}
